<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui"
       xmlns:cc="http://java.sun.com/jsf/composite"
       xmlns:pe="http://primefaces.org/ui/extensions"
       xmlns:comp="http://java.sun.com/jsf/composite/componentes"> 
	      
	     <!--INFERFACE-->
	     <cc:interface>  
	         <cc:attribute name="dataTableExporter" /> 
	         <cc:attribute name="dataTableValue" />  
	     </cc:interface>  
	     
	     <!--IMPLEMENTATION--> 
	     <cc:implementation>  
						
               <p:commandButton id="btnExportar" icon="ui-icon-extlink" 
					            style="height: 18px;" type="button"
					            onclick="PF('dialog').show();"
					            disabled="#{!(cc.attrs.dataTableValue.size() > 0)}">  
				  <pe:tooltip for="btnExportar" value="#{msg['componente-dataexporter-btn-title']}" 
					          showEffect="fadeIn" hideEffect="fadeIn"/>   	            
			   </p:commandButton>		            
		       
		       <p:dialog header="#{msg['componente-dataexporter-titulo']}" widgetVar="dialog" showEffect="fade" 
		                 hideEffect="fade" height="228" width="265" resizable="false">  
				     <h:commandLink>
				       <table>
				         <tr>
				          <td>
				            <p:graphicImage value="#{imageBean.imgPdf}" />  
				            <p:dataExporter type="pdf"  target="#{cc.attrs.dataTableExporter}" fileName="FilePDF" encoding="CP1252" />  
				           </td> 
				           <td>
				             <h:outputText value="#{msg['componente-dataexporter-pdf']}" />
				           </td>
				         </tr>
				       </table>  
				     </h:commandLink> 
				     <div class="div-espaco-2"/> 
				     <h:commandLink>
				       <table border="none">
				         <tr>
				          <td>
				            <p:graphicImage value="#{imageBean.imgXls}" />  
				            <p:dataExporter type="xls" target="#{cc.attrs.dataTableExporter}" fileName="FileXls" />  
				           </td> 
				           <td>
				             <h:outputText value="#{msg['componente-dataexporter-xls']}" />
				           </td>
				         </tr>
				       </table>  
				     </h:commandLink> 
				     <div class="div-espaco-2"/>  
				     <h:commandLink>
				       <table border="none">
				         <tr>
				          <td>
				            <p:graphicImage value="#{imageBean.imgCsv}" />  
				            <p:dataExporter type="csv" target="#{cc.attrs.dataTableExporter}" fileName="FileCsv" />  
				           </td> 
				           <td>
				             <h:outputText value="#{msg['componente-dataexporter-csv']}" />
				           </td>
				         </tr>
				       </table>  
				     </h:commandLink>  
				     <div class="div-espaco-2"/>  
				     <h:commandLink>
				       <table border="none">
				         <tr>
				          <td>
				            <p:graphicImage value="#{imageBean.imgXml}" />  
				            <p:dataExporter type="xml" target="#{cc.attrs.dataTableExporter}" fileName="FileXml" />  
				           </td> 
				           <td>
				             <h:outputText value="#{msg['componente-dataexporter-xml']}" />
				           </td>
				         </tr>
				       </table>  
				     </h:commandLink>  
			   </p:dialog>  
		</cc:implementation>  
     
 </html>     
